<%@ Page Language="C#" MasterPageFile="~/MainLayout.Master" AutoEventWireup="true" CodeBehind="ShowPost.aspx.cs" Inherits="Instedd.Labs.GeoBlogging.WebApplication.ShowPost" Title="Untitled Page" %>

<%@ Register Src="AddComment.ascx" TagName="AddComment" TagPrefix="uc1" %>
<%@ Assembly Name="System.Configuration" %>
<%@ Import Namespace="System.Configuration" %>
<asp:Content ID="Content2" ContentPlaceHolderID="Content" runat="server">
    <script src="http://maps.google.com/maps?file=api&amp;v=2&amp;key=<%= ConfigurationManager.AppSettings["GoogleMapsKey"].ToString() %>"
      type="text/javascript"></script>
    <script type="text/javascript">

    //<![CDATA[
    function loadMap(x,y) {
      if (GBrowserIsCompatible()) {
        var map = new GMap2(document.getElementById("map"));
        map.setCenter(new GLatLng(x, y), 13);
        point = new GLatLng(x,y);
        marker = new GMarker(point);
        map.addOverlay(marker);
      }
    }
    </script>
<br />
<br /><asp:Label ID="PostTitle" CssClass="postTitle" runat="server" Text="PostTitle" /><br />
<span class="postDate">Posted by </span><asp:Label ID="PostedBy" style="font-weight:bold" CssClass="postDate" runat="server" Text="PostDate" /><span class="postDate"> on </span><asp:Label ID="PostDate" CssClass="postDate" runat="server" Text="PostDate" /><br /><br />
<asp:Label ID="PostDescription" CssClass="postDescription" runat="server" Text="PostDescription" /><br />
<br />
    <div id="map" style="width: 400px; height: 200px; border-left-color: green; border-bottom-color: green; border-top-style: solid; border-top-color: green; border-right-style: solid; border-left-style: solid; border-right-color: green; border-bottom-style: solid;"></div>
    <asp:Label ID="PostLatLong" CssClass="postDate" runat="server" Text="" />
<br /><span class="postDescription"><i>Comments:</i></span><br />
<br />
    <asp:Repeater ID="Repeater1" runat="server">
        <ItemTemplate>
            <div>
                <span class="commentTitle">From: </span><asp:Label runat="server" style="font-weight:bold" ID="CommentName" CssClass="commentTitle" Text="<%# Bind('Name') %>" /><br />
                <asp:Label runat="server" ID="CommentDate" CssClass="commentDate" Text="<%# Bind('When') %>" /><br />
                <asp:Label runat="server" ID="CommentDescription" CssClass="commentDescription" Text="<%# Bind('Description') %>" />
                <br /><br />
            </div>
        </ItemTemplate>
    </asp:Repeater>
    <asp:Literal ID="Literal1" runat="server"></asp:Literal><br />
    <form runat="server">
    <a name="comments" />
    <uc1:AddComment id="AddComment1" runat="server">
    </uc1:AddComment>
    </form>
    <br />
<script language="javascript">
if (!(_lat==0 && _long==0))
{
    document.getElementById("map").style.visibility="visible";
    loadMap(_lat, _long);
}
else
{
    document.getElementById("map").style.visibility="hidden";
}
</script>
</asp:Content>
